//
//  CZTitleView.swift
//  SinaBlog
//
//  Created by 李超 on 16/3/23.
//  Copyright © 2016年 lichao. All rights reserved.
//

import UIKit

class CZTitleView: UIButton {

    convenience init(title:String){
      self.init()
      setTitle(title, forState: UIControlState.Normal)
      setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
      setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
      sizeToFit()
        
    }
    
    //重新布局
    override func layoutSubviews() {
        super.layoutSubviews()
        titleLabel?.frame.origin.x = 0
        imageView?.frame.origin.x = (titleLabel?.frame.width)!
        
    }
    
    
    
    
}
